package com.cwvs.services;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.cwvs.dao.AppAdvertDao;
import com.cwvs.utils.Pages;

/**
 * 广告SERVICE
 * 
 */
@Service
public class AppAdvertService {

	@Resource
	private AppAdvertDao appAdvertDao;
	/**
	 * 首页广告位
	 * 
	 * @return
	 */
	public List<Map<String, Object>> advertList() {
		return appAdvertDao.advertList();
	}
	/**
	 * 广告列表
	 * 
	 * @return
	 */
	public Pages advertList(Map<String,Object> m,Pages page) {
		return appAdvertDao.advertList(m, page);
	}
	/**
	 * 保存或者修改广告
	 */
	public boolean saveOrUpdate(Map<String,Object> o){
		return appAdvertDao.saveOrUpdate(o);
	}
	/**
	 * 状态更新
	 * @param id
	 * @return
	 */
	public boolean advertSetStaus(String id,boolean status){
		return appAdvertDao.advertSetStaus(id, status);
	}
	/**
	 * 更新排序号
	 * @param id
	 * @return
	 */
	public boolean advertSortNum(String id,int sort){
		return appAdvertDao.advertSortNum(id, sort);
	}
}
